---
title: "Identifying Price Informativeness"
author: "Eduardo Davila^[Yale] & Cecilia Parlatore^[NYU Stern]"
date: "`r Sys.Date()`"
output:
  html_document: default
  pdf_document: default
---

```{r}

library(here); library(tidyverse); library(lubridate); library(zoo)
path <- here::here(); print(path); setwd(path); rm(path)

```

# Set parameters

```{r}

# Minimum number of observations per unit/stock
N_q <- 40

# Rolling window length for estimation
window_T_q <- 40

# Number of lags for variable changes (q_lag in {1, 4})
q_lag <- 4

# Tenors for term structure estimation
tenors <- 1:5

# Whether to use scaled payoff measures
normalize_payoff <- TRUE
normalize_method <- "numerator"

default_controls_levels <- c("profitability", "dividend_ratio", "asset_growth", "market_beta")
default_controls_logs   <- c()
level_vars <- c("booktomarket", "ivol", "io_share", "analyst_count", "turnover")
log_vars   <- c("mcap")

if (!file.exists("output")){ 
  dir.create("output") 
  dir.create("output/csv") 
  dir.create("output/html_code") 
  dir.create("output/output_figures") 
  dir.create("output/output_tables") 
}

if (!file.exists("intermediate")){ 
  dir.create("intermediate") 
}

save(N_q, window_T_q, q_lag, normalize_payoff, normalize_method,
     tenors, default_controls_levels, default_controls_logs,
     level_vars, log_vars,
     file = "intermediate/parameters.RData")

```
